import java.util.Scanner;

public class StringDemo5 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String s1=new StringBuilder().append(s).reverse().toString();
        System.out.println(s1.equals(s));
    }
}
